package com.usian.wemedia.controller;

import com.usian.apis.wemedia.WmMaterialControllerApi;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.wemedia.service.WmMaterialService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RequestMapping("/api/v1/wemedia")
@RestController
public class WmMaterialController implements WmMaterialControllerApi {
    @Autowired
    private WmMaterialService wmMaterialService;

    @Override
    @PostMapping("/upload")
    public ResponseResult upload(MultipartFile file) {
        return wmMaterialService.upload(file);
    }
}
